The present application claims priority to Taiwan application No.090102244, entitled xe2x80x9cMethod and System for Translating the Format of the Content of Document File,xe2x80x9d filed on Feb. 2, 2001.
(1) Field of the Invention
The invention relates to a method and a system for translating the format of the content of document file, and more particularly to a method and a system which utilize translators and mappers to translate the format of the content of document file.
(2) Description of the Prior Art
In a network environment, interconnection established among multiple data processing systems makes possible the electronic commerce and many business entities conduct their business behavior through the internet communication. Hence, how to communicate or interchange electronic document files between different data processing systems becomes more and more crucial.
In the art, every data processing system can define a format for the content of its own document file in accordance with a standard format, so that interchanging of document files among different systems can be feasible. In this description, the document file can be an order sheet, an invoice, or any document file containing specific data. It is easy to see that the so-called document file in this application can be different document file type. For instance, different formats of order sheets and invoices are usually provided by different data processing systems. Yet, generally speaking, the form of order sheet always includes company title, merchandise name, price, delivery info and so on; and the form of invoice always includes merchandise name, unit price, order amount and so on.
Because different data processing systems provide different standard formats of document files (order sheets for example) for electronic data exchange, a format translation upon the document file for exchanging is required so that the document file can be accepted by another data processing system. Generally, each of the document file types is individually an extensible markup language (XML) file. Therefore, even in the same data processing system, different document file types such as order sheets and invoices are presented with specific XML files.
When a data processing system is assigned to transform a document file from a first standard format to a second standard format, a compiling rule file with respect to the second standard format is required. The compiling rule file is written in the extensive style language (XSL). In the art, each XML file is corresponding to a specific XSL file. That is, more document file types are included in the data processing system, more XSL files exist as well. Similarly, more standard formats are used, and more XSL files are required.
Referring to FIG. 1, a conventional data processing system 10 is shown. The data processing system 10, for instance, includes three document files A, B and C with different individual standard formats; say, an order form, an invoice and a receipt sheet. In the network with the data processing system 10, three more data processing system X, Y and Z are required at least to handle file translating with respect to the data processing system 10 before any electronic file exchanging is possible. Hence, the data processing system 10 requires at least nine compiling rule files (XSL files) a-i, as shown, to process the exchanging of the document files.
Conventionally, in the case that a data processing system includes M document file types and the data processing system needs to exchange document files with N standard formats, Mxc3x97N XSL files are required to be established in the data processing system. It is obviously in the art that for every additional document file type, a specific number, N in this example, of standard XSL files needs to be generated for each existence of standard format. Similarly, for every additional standard format in the data processing system, additional M XSL files are required to account for each document file type. Therefore, the fact that a huge number of XSL files exist in the conventional data processing system leads definitely to less efficiency in data processing, and it also limits the electronic exchanging of document files in the network.
Accordingly, it is a primary object of the present invention to provide a method and a system that utilize a translator and a mapper to translate a format of a content of document file. In this system, the data processing system can use the translator to translate a document file with a specific format into a respective pre-map data file with a predetermined content format. Then, the mapper is introduced to map the pre-map data file onto a standard format data file with the target standard format. In this present invention, the data processing system can have a plurality of compiling rule files (XSL files) stored in the translator, in which the compiling rule files are applied to translate the document file into the pre-map data file. The data processing system can also have a plurality of mapping rule files (XSL files) stored in the mapper, in which the mapping rule files are applied to map the pre-map data file onto a respective standard format data file with a required standard format.
In the present invention, the number of the compiling rule files is equal to the number of formats for document files; i.e., each compiling rule file is respective to a document file type. Also, the number of the mapping rule files is equal to the number of standard formats; i.e., each mapping rule file is respective to a standard format. Hence, in the case that the data processing system includes M document file types and needs to perform file-exchange with N standard formats, the data processing system then requires only M+N XSL files. Furthermore, for every additional document file type, the data processing system needs to add an XSL file of compiling rule file. Equally, for every additional standard format, the data processing system only needs to add an XSL file of mapping rule file.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after having read the following detailed description of the preferred embodiment, which is illustrated in the various figures and drawings.